Repository navigation
feat: setup bundle workflow - #22
Conversation
| }, | ||
| "devDependencies": { | ||
| "@opentelemetry/semantic-conventions": "1.43.0", | ||
| "esbuild": "0.28.2", |
There was a problem hiding this comment.
can I advocate for us trying https://viteplus.dev/ here? rolldown is easier to grok for me, and I'm sure we can get a lot of support from the vite team if we need help
There was a problem hiding this comment.
My experience was that it needs more configurations than esbuild to do a simple bundle. Here the only thing we need is creating a bundle for Node.js core to integrate. I'd prefer avoiding unnecessary tool layers.
There was a problem hiding this comment.
that's fair. IMO it's not too much because it's just configuring a single vite.config.js file, but I don't want to block.
There was a problem hiding this comment.
can I advocate for us trying viteplus.dev here? rolldown is easier to grok for me, and I'm sure we can get a lot of support from the vite team if we need help
My question is why does this project even need a build step? Why do we need this complication?
There was a problem hiding this comment.
This is for Node.js core integration. Not intended for npm publishing.
Core embeds its JS sources with js2c, and vendored deps there ship as one prebuilt file. undici ships deps/undici/undici.js and amaro ships deps/amaro/dist/index.js. With one file, the core updater script just copies it in. Nobody has to map our internal require('./lib/...') graph onto lib/internal/deps/... paths by hand on every update.
There was a problem hiding this comment.
We discussed this elsewhere. Noting it here for posterity:
This concerns me because translating code like this at all is inherently error prone. With tricky code like this, it becomes even more likely that errors which don't exist in the actual source will be introduced by the translation process. If this is a requirement for shipping a "vendored" module with core, then I contend this is reason enough to develop it as part of core directly.
There was a problem hiding this comment.
This is not opening a new precedent in node core about bundling. If you feel strongly about no-bundle, or no-build policy, please feel free to open an issue.
| }, | ||
| "devDependencies": { | ||
| "@opentelemetry/semantic-conventions": "1.43.0", | ||
| "esbuild": "0.28.2", |
There was a problem hiding this comment.
that's fair. IMO it's not too much because it's just configuring a single vite.config.js file, but I don't want to block.
Setup bundle workflow for node core integration.
Refs: https://github.com/nodejs/undici/blob/4b36fef66487eacb884e48c9a6f39e3317f5a034/package.json#L65
Refs: https://github.com/nodejs/amaro/blob/b1aa74927512380f56a8449e8c1ce470284fe70f/esbuild.config.mjs